package com.my12306.user.model.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 用户表
 *
 * @Author:苏牧夕
 * @Date:2020-05-15 17:36:13
 * @Version 1.0
 */
@TableName("p_user")
@ApiModel(description = "用户实体")
@Api("用户实体")
public class UserVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @ApiModelProperty(name = "id", dataType = "Long", required = false)
    private Long id;
    /**
     * 真实名字
     */
    @ApiModelProperty(dataType = "String", name = "realname", value = "真实姓名", required = true)
    private String realname;
    /**
     * 用户名
     */
    @ApiModelProperty(dataType = "String", name = "username", value = "用户昵称", required = true)
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 性别
     */
    @ApiModelProperty(dataType = "Integer", name = "sex", value = "性别", required = false)
    private Integer sex;
    /**
     * 地址
     */
    @ApiModelProperty(dataType = "String", name = "address", value = "地址", required = false)
    private String address;
    /**
     * 邮箱
     */
    @ApiModelProperty(dataType = "String", name = "email", value = "邮箱", required = false)
    private String email;
    /**
     * 电话
     */
    @ApiModelProperty(dataType = "String", name = "phone", value = "用户手机号", required = true)
    private String phone;
    /**
     * 出身日期
     */
    @ApiModelProperty(dataType = "String", name = "birthday", value = "生日", required = false)
    private String birthday;
    /**
     * 头像地址
     */
    @ApiModelProperty(dataType = "String", name = "imgUrl", value = "头像地址", required = false)
    private String imgUrl;
    /**
     * 医生/专家id
     */
    @ApiModelProperty(dataType = "Long", name = "authId", value = "医生/专家id", required = false)
    private Long authId;
    /**
     * 用户类型-0-普通用户 1-认证了医生  2-其他专家
     */
    @ApiModelProperty(dataType = "Integer", name = "userType", value = "用户类型-0-普通用户 1-认证了医生  2-其他专家", required = false)
    private Integer userType;
    /**
     * 显示状态 0-表示禁用 1-表示正常
     */
    @ApiModelProperty(dataType = "Integer", name = "showStatus", value = "显示状态 0-表示禁用 1-表示正常", required = false)
    private Integer showStatus;
    /**
     * 逻辑删除 0-表示删除，1-表示正常
     */
    @ApiModelProperty(dataType = "Integer", name = "logicDelete", value = "逻辑删除 0-表示删除，1-表示正常", required = false)
    private Integer logicDelete;
    /**
     * 注册时间
     */
    @ApiModelProperty(dataType = "Date", name = "logicDelete", value = "注册时间", required = false)
    private Date createDate;
    /**
     * 修改时间
     */
    @ApiModelProperty(dataType = "Date", name = "updateDate", value = "改时间", required = false)
    private Date updateDate;
    /**
     * 身份证
     */
    private String idCard;
    @ApiModelProperty(dataType = "Integer", name = "recentLogTime", value = "最近登陆时间", required = false)
    private Date recentLogTime;
    /**
     * 版本号
     */
    @ApiModelProperty(dataType = "Integer", name = "version", value = "本号", required = false)
    private Integer version;
    @ApiModelProperty(dataType = "String", name = "newPassword", value = "新密码", required = false)
    private String newPassword;

    private List<Long> roleIdList;

    public UserVo() {
    }

    public UserVo(Long id, String realname, String username, String password,String idCard, Integer sex, String address, String email, String phone, String birthday, String imgUrl, Long authId, Integer userType, Integer showStatus, Integer logicDelete, Date createDate, Date updateDate, Integer version, String newPassword, List<Long> roleIdList) {
        this.id = id;
        this.realname = realname;
        this.username = username;
        this.password = password;
        this.sex = sex;
        this.address = address;
        this.email = email;
        this.idCard = idCard;
        this.phone = phone;
        this.birthday = birthday;
        this.imgUrl = imgUrl;
        this.authId = authId;
        this.userType = userType;
        this.showStatus = showStatus;
        this.logicDelete = logicDelete;
        this.createDate = createDate;
        this.updateDate = updateDate;
        this.version = version;
        this.newPassword = newPassword;
        this.roleIdList = roleIdList;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @Override
    public String toString() {
        return "UserVo{" +
                "id=" + id +
                ", realname='" + realname + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex=" + sex +
                ", address='" + address + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", birthday='" + birthday + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", authId=" + authId +
                ", userType=" + userType +
                ", showStatus=" + showStatus +
                ", logicDelete=" + logicDelete +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", version=" + version +
                ", newPassword='" + newPassword + '\'' +
                ", roleIdList=" + roleIdList +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof UserVo)) return false;
        UserVo userVo = (UserVo) o;
        return Objects.equals(getId(), userVo.getId()) &&
                Objects.equals(getRealname(), userVo.getRealname()) &&
                Objects.equals(getUsername(), userVo.getUsername()) &&
                Objects.equals(getPassword(), userVo.getPassword()) &&
                Objects.equals(getSex(), userVo.getSex()) &&
                Objects.equals(getAddress(), userVo.getAddress()) &&
                Objects.equals(getEmail(), userVo.getEmail()) &&
                Objects.equals(getPhone(), userVo.getPhone()) &&
                Objects.equals(getBirthday(), userVo.getBirthday()) &&
                Objects.equals(getImgUrl(), userVo.getImgUrl()) &&
                Objects.equals(getAuthId(), userVo.getAuthId()) &&
                Objects.equals(getUserType(), userVo.getUserType()) &&
                Objects.equals(getShowStatus(), userVo.getShowStatus()) &&
                Objects.equals(getLogicDelete(), userVo.getLogicDelete()) &&
                Objects.equals(getCreateDate(), userVo.getCreateDate()) &&
                Objects.equals(getUpdateDate(), userVo.getUpdateDate()) &&
                Objects.equals(getVersion(), userVo.getVersion()) &&
                Objects.equals(getNewPassword(), userVo.getNewPassword()) &&
                Objects.equals(getRoleIdList(), userVo.getRoleIdList());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getRealname(), getUsername(), getPassword(), getSex(), getAddress(), getEmail(), getPhone(), getBirthday(), getImgUrl(), getAuthId(), getUserType(), getShowStatus(), getLogicDelete(), getCreateDate(), getUpdateDate(), getVersion(), getNewPassword(), getRoleIdList());
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Long getAuthId() {
        return authId;
    }

    public void setAuthId(Long authId) {
        this.authId = authId;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getShowStatus() {
        return showStatus;
    }

    public void setShowStatus(Integer showStatus) {
        this.showStatus = showStatus;
    }

    public Integer getLogicDelete() {
        return logicDelete;
    }

    public void setLogicDelete(Integer logicDelete) {
        this.logicDelete = logicDelete;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public List<Long> getRoleIdList() {
        return roleIdList;
    }

    public void setRoleIdList(List<Long> roleIdList) {
        this.roleIdList = roleIdList;
    }
}
